package com.hwang.demo1.practice;

/**
 * @ Author    :hwang
 * @ param     :
 * @ return    :
 * @ Description:
 * @ Date       :2019/11/9
*/

public class compeare {
    public static void main(String[] args) {
        int x = 3;
        int y = 4;
        System.out.println("现在开始x和y的比较");
        System.out.println(x==y);
        System.out.println(x!=y);
        System.out.println(x>=y);
        System.out.println(x<=y);
        System.out.println();

        System.out.println("现在开始各种比较运算符");
        System.out.println(x > y & x < y);
        System.out.println(x > y | x < y);
        System.out.println(!(x > y));
        // & 都会让后面计算，而&&时，若前面为假，不会让后面计算
        System.out.println(x > y && x < y);
        System.out.println(x > y || x < y);
        System.out.println(x < y ^ x < y);
    }
}
